Skip to content

Make the umbrella context nest (#58261) - #58261

Open
j-piasecki wants to merge 1 commit into
react:mainfrom
j-piasecki:export-D118114589
Open

Make the umbrella context nest (#58261)#58261
j-piasecki wants to merge 1 commit into
react:mainfrom
j-piasecki:export-D118114589

Conversation

@j-piasecki

@j-piasecki j-piasecki commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary:

Umbrellas bracketed their includes with a bare #define/#undef of
RN_UMBRELLA_CONTEXT. That does not nest: an umbrella reached from inside
another umbrella's context cleared it on the way out, so every public header
the outer umbrella included afterwards hit UmbrellaGuard.h. Switch the
bracket to #pragma push_macro/pop_macro so the inner umbrella restores the
outer context instead of clearing it.

Nothing nests today, it starts once a
for-frameworks header reaches a public module through its umbrella.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D118114589

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 31, 2026
@meta-codesync

meta-codesync Bot commented Aug 31, 2026

Copy link
Copy Markdown

@j-piasecki has exported this pull request. If you are a Meta employee, you can view the originating Diff in D118114589.

@facebook-github-tools facebook-github-tools Bot added p: Software Mansion Partner: Software Mansion Partner p: Facebook Partner: Facebook labels Aug 31, 2026

@cortinico cortinico left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

Summary:

Umbrellas bracketed their includes with a bare `#define`/`#undef` of
`RN_UMBRELLA_CONTEXT`. That does not nest: an umbrella reached from inside
another umbrella's context cleared it on the way out, so every public header
the outer umbrella included afterwards hit `UmbrellaGuard.h`. Switch the
bracket to `#pragma push_macro`/`pop_macro` so the inner umbrella restores the
outer context instead of clearing it.

Nothing nests today, it starts once a
for-frameworks header reaches a public module through its umbrella.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D118114589
@meta-codesync meta-codesync Bot changed the title Make the umbrella context nest Make the umbrella context nest (#58261) Sep 2, 2026
j-piasecki added a commit to j-piasecki/react-native that referenced this pull request Sep 2, 2026
Summary:

Umbrellas bracketed their includes with a bare `#define`/`#undef` of
`RN_UMBRELLA_CONTEXT`. That does not nest: an umbrella reached from inside
another umbrella's context cleared it on the way out, so every public header
the outer umbrella included afterwards hit `UmbrellaGuard.h`. Switch the
bracket to `#pragma push_macro`/`pop_macro` so the inner umbrella restores the
outer context instead of clearing it.

Nothing nests today, it starts once a
for-frameworks header reaches a public module through its umbrella.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D118114589
j-piasecki added a commit to j-piasecki/react-native that referenced this pull request Sep 2, 2026
Summary:

Umbrellas bracketed their includes with a bare `#define`/`#undef` of
`RN_UMBRELLA_CONTEXT`. That does not nest: an umbrella reached from inside
another umbrella's context cleared it on the way out, so every public header
the outer umbrella included afterwards hit `UmbrellaGuard.h`. Switch the
bracket to `#pragma push_macro`/`pop_macro` so the inner umbrella restores the
outer context instead of clearing it.

Nothing nests today, it starts once a
for-frameworks header reaches a public module through its umbrella.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D118114589
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported p: Facebook Partner: Facebook p: Software Mansion Partner: Software Mansion Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants